package com.gopay.common.core.dic.dao.impl;

import java.io.Serializable;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.springframework.stereotype.Repository;

import com.gopay.common.base.dao.impl.BaseDAOImpl;
import com.gopay.common.core.dic.dao.DicPayChannelTypeDAO;
import com.gopay.common.domain.dic.DicPayChannelType;

/**
 * 
 * @DicPayChannelDAOTypeImpl.java
 * @author liujy
 * @2013-8-22 下午2:48:11  www.gopay.com.cn Inc.All rights reserved.
 */
@Repository("dicPayChannelTypeDAO")
public class DicPayChannelTypeDAOImpl extends BaseDAOImpl<DicPayChannelType, Serializable> implements DicPayChannelTypeDAO{

    
    @Override
    public List<DicPayChannelType> findDisplayType() {
        String hql = "from DicPayChannelType d where d.displayFlag=:displayFlag and d.delFlag=:delFlag";
        Map<String, Object> param = new HashMap<String, Object>();
        param.put("displayFlag", 1);
        param.put("delFlag", 0);
        return findByHql(hql, param);
    }

    @Override
    public List<DicPayChannelType> findChannelTypesByCodes(List<String> codes) {
        String hql = "from DicPayChannelType d where d.code in (:codes)";
        Map<String, Object> param = new HashMap<String, Object>();
        return findByHql(hql, param);
    }

}